<template>
    <div>
       <!-- ref实现双向数据的绑定 -->
        <p>{{ num }}</p>
        <button @click="num++">
            +
        </button>
        <button @click="handleCk">
            ++
        </button>
    </div>
</template>

<script lang='ts' setup>
import { ref } from "vue"
import comp03 from "@/components/vue3学习案例/comp03.vue"
    let num = ref(30);
    console.log(num);
    console.log(num.value);
    const handleCk = ()=>{
        num.value++;
        console.log(num.value);
        
    }


</script>
    
<style lang = "less" scoped>
    
</style>